﻿using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLBH.DAO
{
    class DAO_KhachHang
    {
        public DAO_KhachHang()
        {
            Connection_Sql.StartConnect();
        }
        public int Insert(KhachHang kh)
        {
            IDictionary<string, string> d = new Dictionary<string, string>();
            d.Add("@ma_kh", kh.Makh.Trim());
            d.Add("@ten_kh", kh.Tenkh.Trim());
            d.Add("@ten_vt", kh.Ten_vt.Trim());
            d.Add("@nhom_kh", kh.Nhomkh.Trim());
            d.Add("@loai_kh", kh.Loaikh.Trim());
            String spInsert = "insert_khachhang";
            return Connection_Sql.Insert(spInsert, d, true);
        }
    }
}
